package com.xbongbong.saas.enums;

import com.xbongbong.i18n.util.I18nMessageUtil;
import lombok.Getter;

import java.util.Arrays;
import java.util.List;

/**
 * @author WuHB
 * @date 2021/10/20 13:59
 */
@Getter
public enum CallCenterCallLogCallSourceEnum {

     // 呼叫中心
    CALL_CENTER(0, "enum.callSourceEnum.name.call_center"),

    // 阿里云呼叫中心
    ALIYUN_CALL_CENTER(1, "enum.callSourceEnum.name.aliyun_call_center"),

    // 优音云呼
    UIN_YUN_CALL(2, "enum.callSourceEnum.name.uin_yun_call"),

    // 外接系统
    EXTERNAL_SYSTEM(3, "enum.callSourceEnum.name.external_system"),

    ;

    CallCenterCallLogCallSourceEnum(Integer code, String name) {
        this.code = code;
        this.name = name;
    }

    /**
     * 编码
     */
    private final Integer code;

    /**
     * 枚举信息--中文名称
     */
    private final String name;

    public String getName() {
        return I18nMessageUtil.getMessage(name);
    }

    public static List<Integer> listYunCallCallSource(){
        return Arrays.asList(ALIYUN_CALL_CENTER.code, UIN_YUN_CALL.code, EXTERNAL_SYSTEM.code);
    }
}
